<?php
App::uses('AppModel', 'Model');

class Post extends AppModel {
	public $belongsTo = array(
        'Category' => array(
            'className' => 'Category',
            'foreignKey' => 'catId'
        ),
        'User' => array(
            'className' => 'User',
            'foreignKey' => 'createBy'
        )
        	
    );
	public $validate = array(
		'title' => array(
        "rule" => "notEmpty",
		'message' => 'Nhập tiêu đề')
	);

}
